/**
 * @FileName Client.java
 * @Package com.designMode.decorate
 * -------------------------------------
 * @function Please write description of function
 * @Date 2016-1-5 上午10:55:54
 * -------------------------------------
 * Copyright (c) 2016,顾博君 All Rights Reserved.
 */
package com.designMode.decorate;

/**
 * @author 顾博君
 * @ClassName Client
 * @Date 2016-1-5 上午10:55:54
 * @Function 场景类
 */
public class Client {
    public static void main(String[] args) {
        //被装饰者
        Component component = new ConcreteComponent();
        //装饰者1装饰
        component = new ConcreteDecorator1(component);
        //装饰者2装饰
        component = new ConcreteDecorator2(component);
        //执行被装饰后的方法
        component.operate();
    }
}
